package creator.prototype;

public class ClientDemo12 {

    public static void main(String[] args) throws CloneNotSupportedException {
        QianClone zjr = new QianClone("zjr", 23);
        QianClone clone = (QianClone) zjr.clone();
        QianClone clone1 = (QianClone) zjr.clone();
        QianClone clone2 = (QianClone) zjr.clone();
        QianClone clone3 = (QianClone) zjr.clone();
        System.out.println(zjr);
        System.out.println(clone);
        System.out.println(clone1);
        System.out.println(clone2);
        System.out.println(clone3);


        DeepClone cxl = new DeepClone("cxl", 23);
        cxl.qianClone = new QianClone("zjr", 24);
        DeepClone clone4 = (DeepClone) cxl.clone();
        DeepClone clone5 = (DeepClone) cxl.clone();
        DeepClone clone6 = (DeepClone) cxl.clone();
        System.out.println(cxl);
        System.out.println(clone4);
        System.out.println(clone5);
        System.out.println(clone6);


        DeepClone zyr = new DeepClone("zyr", 24);
        zyr.qianClone = new QianClone("zjr", 22);
        DeepClone deepClone = zyr.serizableClone();
        DeepClone deepClone1 = zyr.serizableClone();
        DeepClone deepClone2 = zyr.serizableClone();
        System.out.println(deepClone2);
        System.out.println(deepClone1);
        System.out.println(deepClone);

    }

}
